<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org" lang="en">
<head>
    <meta charset="UTF-8"/>
    <link rel="shortcut icon" href="/static/images/favicon.ico"/>
    <link rel="bookmark" href="/static/images/favicon.ico"/>
    <title th:text="${session.user.username} + ' | 请假管理'"></title>
    <link href="/static/css/bootstrap.min.css" rel="stylesheet" type="text/css"/>
    <link href="/static/css/font-awesome.min.css" rel="stylesheet" type="text/css"/>
    <link href="/static/css/sweetalert.min.css" rel="stylesheet" type="text/css"/>
    <link href="/static/css/semantic.min.css" rel="stylesheet" type="text/css"/>
</head>
<body>

<nav class="navbar navbar-default navbar-fixed-top"
     style="background-color: #f6f6f6; border: none;box-shadow: 0px 2px 8px 0px rgba(50,50,50,0.25);" role="navigation">
    <div class="container">
        <div class="navbar-header">
            <a class="navbar-brand" href="">
                <img alt="网站Logo" src="/static/images/logo.png" style="margin-top: -10px; width: 35px"/>
            </a>
            <a class="navbar-brand" href="/">
                系统管理
            </a>
        </div>

        <ul class="nav navbar-nav">
            <li><a href="/loginOK"><span class="glyphicon glyphicon-pencil"></span>&nbsp;&nbsp;当前任务</a></li>
            <li><a href="/modelPage"><span class="glyphicon glyphicon-eye-open"></span>&nbsp;&nbsp;模型管理</a></li>
            <li><a href="/"><span class="glyphicon glyphicon-briefcase"></span>&nbsp;&nbsp;流程管理</a></li>
            <li class="active"><a href="/leavePage"><span class="glyphicon glyphicon-eye-open"></span>&nbsp;&nbsp;请假管理</a></li>
        </ul>

        <div class="ui inline dropdown navbar-right" style="line-height: 50px">
            <div class="text">
                <img class="ui avatar image" src="/static/images/avatar/default.png"/>
                <span id="username" th:text="${session.user.username}"></span>
            </div>
            <i class="dropdown icon"></i>
            <div class="menu">
                <div class="item" style="color: black" id="logout"><a href="/logout"><span
                        class="glyphicon glyphicon-log-out"></span> &nbsp;退出登录</a></div>
            </div>
        </div>
    </div>
</nav>

<div class="container-fluid" style="margin-top: 70px">
    <div class="row" style="">
        <div class="col-xs-2">
            <ul class="nav nav-pills nav-stacked">
                <li class="active"><a data-toggle="tab" href="#my_leave">我的请假</a></li>
                <li data-toggle="tab" href="#start_leave"><a href="">发起请假</a></li>
                <li data-toggle="tab" href="#process_leave"><a href="">审批请假</a></li>
            </ul>
        </div>

        <div class="col-xs-10 tab-content">
            <div class="tab-pane fade active in" id="start_leave" style="padding-left: 10px;">
                <div class="panel panel-default">
                    <div class="panel-body">
                        <ol class="breadcrumb">
                            <li class="active">发起流程</li>
                        </ol>

                        <div>
                            <div class="box-content">
                                <form role="form" action="startleave" method="post">
                                    <div class="form-group">
                                        <label>请假类型</label> <select name="leave_type"
                                                                    class="form-control">
                                        <option value="事假">事假</option>
                                        <option value="病假">病假</option>
                                        <option value="年假">年假</option>
                                        <option value="丧假">丧假</option>
                                        <option value="产假">产假</option>
                                    </select>
                                    </div>
                                    <div class="form-group has-feedback">
                                        <label class="control-label">开始时间</label>
                                        <input id="start" class="form-control" name="start_time" placeholder="开始时间" /><span class="fa fa-calendar txt-danger form-control-feedback"></span>
                                    </div>
                                    <div class="form-group has-feedback">
                                        <label>结束时间</label> <input id="end" class="form-control" name="end_time"
                                                                   placeholder="结束时间" /><span class="fa fa-calendar txt-danger form-control-feedback"></span>
                                    </div>
                                    <div class="form-group">
                                        <label>请假原因</label>
                                        <textarea class="form-control" name="reason" rows="3"></textarea>
                                    </div>
                                    <button  class="btn btn-success" onclick="leaveStart()" data-toggle="modal"
                                            data-target="#processModal">开始申请</button>
                                </form>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="panel panel-default">
                    <div class="panel-body">
                        <ol class="breadcrumb">
                            <li class="active">我的请假</li>
                        </ol>

                        <div id="addPanel">

                        </div>

                        <div id="container">
                            <table class="table table-bordered table-striped">
                                <thead>
                                <tr class="info">
                                    <th style="text-align: center">业务ID</th>
                                    <th style="text-align: center">流程ID</th>
                                    <th style="text-align: center">开始时间</th>
                                    <th style="text-align: center">结束时间</th>
                                    <th style="text-align: center">申请人Id</th>
                                    <th style="text-align: center">流程图</th>
                                    <th style="text-align: center">操作</th>
                                </tr>
                                </thead>
                                <tbody id="p_tbid" style="text-align: center">

                                </tbody>
                            </table>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>

<div class="modal fade" id="processImageModal" tabindex="-1" role="dialog"
     aria-labelledby="myModalLabel">
    <div style="width: 1000px; height: 600px" class="modal-dialog model-lg" role="document">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                    <span aria-hidden="true">&times;</span></button>
                <h4 class="modal-title" id="myProcessImageModalLabel">操作流程 &nbsp; > &nbsp; 流程图</h4>
            </div>
            <div class="modal-body" id="process-image-modal-body">

            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-default" data-dismiss="modal">关 闭</button>

            </div>
        </div>
    </div>
</div>

</body>
<script src="/static/js/jquery.min.js"></script>
<script src="/static/js/jquery.min.js"></script>
<script src="/static/js/bootstrap.min.js"></script>
<script src="/static/js/sweetalert.min.js"></script>
<script src="/static/js/semantic.min.js"></script>
<script src="/static/js/moment.min.js"></script>
<script src="/static/js/leave.js"></script>
</html>